package com.example.splash

import android.animation.ObjectAnimator
import android.view.View
import android.widget.ImageView
import com.zhpan.bannerview.holder.ViewHolder


class BannerViewHolder : ViewHolder<GuideEntiy> {
    override fun getLayoutId(): Int =R.layout.item_guide

    override fun onBind(itemView: View?, data: GuideEntiy?, position: Int, size: Int) {
        var mImageView =itemView?.findViewById<ImageView>(R.id.banner_image)
        data?.imageRes?.let { mImageView?.setImageResource(it) }

        var alphaAnim =ObjectAnimator.ofFloat(mImageView,"alpha",0.0f,1.0f)
        alphaAnim.duration=1200
        alphaAnim.start()
    }


}